{% extends 'base/base.html' %}

{% block css %}
<style xmlns="">
    .bdsub{
        padding: 1px;
        background: #FFFFFF;
        border: 1px solid #E4E4E4;
    }
    #content{
        background: url(/static/img/header_bg.png) no-repeat;
        background-position: 0 -506px;
        background-repeat: repeat-x;
        line-height: 30px;
        position: relative;
    }
    .grid{
        width: 97%;
        background-color: transparent;
        border-collapse: collapse;
        border-spacing: 0;
        border: 1px solid #E4E4E4;
        margin: 10px;
    }
    .grid caption{
        font-size: 14px;
        font-weight: bold;
        text-align: center;
    }
    .center table{
        border: 1px solid #E4E4E4;
        margin: 10px;
        background-color: transparent;
        border-collapse: collapse;
        border-spacing: 0;
    }
    tbody td{
        border-bottom: 1px dotted #E4E4E4;
        padding: 0 3px;
    }
    tbody td .left{
        text-align: right;
    }
    tbody td input{
        float: left;
        display: inline;
        padding-left: 5px;
    }
    tr .foot{
        background: #F2F2F2;
        padding-left: 10px;
        font-weight: bold;
        text-align: center;
    }
    a, a:visited{
        color: #2f468f;
        text-decoration: none;
        position: static;
    }
    tbody td input {
        height: 19px;
    }
    table .button{
        height: 21px;
        line-height: 21px;
    }
</style>
{% endblock %}

{% block title %}
<title>登录页面</title>
{% endblock %}


{% block body %}
<div class="bdsub">
    <div class="bdtop"></div>
    <dl id="content">
        <form name="loginForm" id="loginForm" method="post">
            {% csrf_token %}
            <table class="grid" width="250">
                <caption>用户登录</caption>
                <tbody>
                <tr>
                    <td class="odd">
                        <table width="100%" cellspacing="0" cellpadding="5">
                            <tbody>
                            <tr>
                                <td width="37%" valign="middle" class="left">用户名：</td>
                                <td width="63%"><input type="text" class="text" name="username" id="username"
                                                       size="25" maxlength="32" style="width:160px"></td>
                            </tr>
                            <tr>
                                <td valign="middle" class="left">密　码：</td>
                                <td><input type="password" class="text" name="password" id="password" size="25"
                                           maxlength="32" style="width:160px"></td>
                            </tr>
                            <tr>

                                <td><input type="hidden" name="action" value="login"></td>
                                <td>
                                    <button type="submit" class="btn btn-default">登录</button>
                                    {% if errors %}
                                    <span class="text-danger">{{ errors }}</span>
                                    {% endif %}
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="foot"><a href="{% url 'user:register' %}">新用户注册</a></td>
                </tr>
                </tbody>
            </table>
        </form>
    </dl>
</div>
{% endblock %}